﻿namespace Entities
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;

    public class FilterOperations
    {
        #region Constructor

        public FilterOperations()
        {
            RenderFileType = true;
            RenderFileName = true;
            FileTypes = new string[] { };
            Policies = new string[] { };
            Hosts = new string[] { };
            OperationTypes = new int[] { };
        }

        #endregion

        #region Public Properties

        [RegularExpression(@"^(0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])[- /.](19|20)\d\d$", ErrorMessage = "invalid format")]
        public DateTime? StartDate { get; set; }

        [RegularExpression(@"^(0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])[- /.](19|20)\d\d$", ErrorMessage = "invalid format")]
        public DateTime? EndDate { get; set; }
        public string User { get; set; }
        public IEnumerable<string> FileTypes { get; set; }
        public IEnumerable<string> Policies { get; set; }
        public IEnumerable<int> OperationTypes { get; set; }
        public string FileName { get; set; }
        public IEnumerable<string> Hosts { get; set; }
        public OperationType operationType { get; set; }
        public bool RenderFileType { get; set; }
        public bool RenderFileName { get; set; }
        public bool IsDir { get; set; }
        public bool RenderOperationTypes { get; set; }
        public string BotName { get; set; }

        #endregion
    }
}
